import {createRouter, createWebHistory} from "vue-router";
import type {RouteRecordRaw} from "vue-router";

import employee from './employee'

const routes:Readonly<RouteRecordRaw[]> = [
  {
    path: '/',
    name: 'Index',
    redirect(to) {
      if (to.name === 'Index') {
        return 'Home'
      }else{
        return 'Home'
      }
    },
  },
  {
    path: '/home',
    name: 'Home',
    component:()=>import('../views/index.vue'),
  },
  employee,
]
const router = createRouter({
  history: createWebHistory(),
  routes: routes
});

export default router